package com.ztgf.logistics.api.client.deppon;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.ztgf.common.constant.Result;
import com.ztgf.common.enums.CodeEnum;
import com.ztgf.common.utils.StrUtils;
import com.ztgf.logistics.models.bo.deppon.LogisticsBillOrderSnapshotBO;
import com.ztgf.logistics.models.bo.deppon.LogisticsBillOrderSnapshotSaveBO;
import com.ztgf.logistics.models.dto.deppon.LogisticsBillOrderSnapshotDTO;
import com.ztgf.logistics.models.service.deppon.ILogisticsBillOrderSnapshotService;
import com.ztgf.logistics.models.vo.deppon.LogisticsBillOrderSnapshotVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

/**
 * 物流订单快照表控制器
 *
 * @author mxli
 * @Date 2021-09-13 22:15:24
 */

@RestController
@RequestMapping("/api/logisticsBillOrderSnapshot")
@Slf4j
@Api(value = "LogisticsBillOrderSnapshotApiController",tags = "物流订单快照表接口")
public class LogisticsBillOrderSnapshotApiController {

    @DubboReference
    private ILogisticsBillOrderSnapshotService logisticsBillOrderSnapshotService;

    @PostMapping("/get")
    @ApiOperation(value = "根据id查找",notes = "根据id查找")
    @ApiImplicitParam(name = "id",value = "id",required = true,paramType = "query", dataType = "Long")
    public Result<LogisticsBillOrderSnapshotVO> get(@RequestParam("id") Long id){
        return logisticsBillOrderSnapshotService.get(id);
    }

    @ApiOperation(value = "物流订单快照表列表",notes = "物流订单快照表列表")
    @PostMapping("/queryPageList")
    public Result<Page<LogisticsBillOrderSnapshotDTO>> queryPageList(LogisticsBillOrderSnapshotBO bo){
        return logisticsBillOrderSnapshotService.queryPageList(bo);
    }
}
